Socket
Socket
Sign inDemoInstall

fsa-chunk-store

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fsa-chunk-store

File System Access API chunk store that is abstract-chunk-store compliant, with filesystem-like folder structure.


Version published
Weekly downloads
2.1K
increased by28.69%
Maintainers
0
Weekly downloads
 
Created
Source

fsa-chunk-store

File System Access API chunk store that is abstract-chunk-store compliant

abstract chunk store

Install

npm install https://github.com/ThaUnknown/fsa-chunk-store

Usage

const FSAChunkStore = require('fsa-chunk-store')
const chunks = FSAChunkStore(10)

chunks.put(0, new Buffer('01234567890'), function (err) {
  if (err) throw err
  chunks.get(0, function (err, chunk) {
    if (err) throw err
    console.log(chunk) // '01234567890' as a buffer
  })
})

Options

  • length: Total size of the chunk store (optional, default: Infinity)
  • name: Top-level directory to create for this store (optional, default: default)
  • rootDir: Root directory handle (optional, default: navigator.storage.getDirectory())
  • files: Array of File objects (optional, { path, length })

About

Originally based on https://github.com/SocketDev/fs-access-chunk-store but improved to support filesystem-like folder structures, to allow external user manipulation of files.

License

MIT.

Keywords

FAQs

Package last updated on 04 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc